package com.panopset.games.craps;

import com.panopset.centralen.util.MathUtil;

/**
 *
 * Represents two six sided dice.
 *
 * @author Karl Dinwiddie
 *
 */
public final class Dice {

    /**
     * Minumum roll is 2.
     */
    public static final int MIN_ROLL = 2;

    /**
     * Most likely roll is a 7.
     */
    public static final int MOST_LIKELY_ROLL = 7;

    /**
     * Maximum roll is 12.
     */
    public static final int MAX_ROLL = 12;

    /**
     * 6 sided dice are used in craps.
     */
    public static final int SIDES = 6;

    /**
     * Prevent instantiation.
     */
    private Dice() { }

    /**
     * @return Number between 2 and 12, adding two random numbers between
     * 1 and 6.
     */
    public static int roll() {
        return MathUtil.random(1, Dice.SIDES)
             + MathUtil.random(1, Dice.SIDES);
    }
}
